//
// SourceFile.cs: This file contains the definition for SourceFile class.
//
// Author: BDS - thinktecture 
//
namespace Thinktecture.Tools.Web.Services.CodeGeneration
{
	/// <summary>
	/// SourceFile class represents the data structure for the Source code file.
	/// </summary>
	public class SourceFile
	{
		#region Private Members
		
		private string _fileName;
		private string _sourceCode;
		private bool _asmxDeclarative;
		private bool _serviceImplementation;
		private bool _aspxHelpPage;		
		private bool _isProxy; // CSC added flag for proxy class
		private bool _isAsmxHelpModule; // BDS added flag for Asmx Help Module.

		#endregion

		#region Constructors

		/// <summary>
		/// Default constructor. Initializes the members to it's default values.
		/// </summary>
		public SourceFile()
		{
			_fileName = string.Empty;
			_sourceCode = string.Empty;
			_asmxDeclarative = false;
			_serviceImplementation = false;
			_aspxHelpPage = false;
			_isAsmxHelpModule = false;
		}

		/// <summary>
		/// This countructors enables initializing the members.
		/// </summary>
		/// <param name="pfilename">Target name of the file.</param>
		/// <param name="psourcecode">Source code</param>
		public SourceFile(string pfilename, string psourcecode)
		{
			_fileName = pfilename;
			_sourceCode = psourcecode;
			_asmxDeclarative = false;
			_serviceImplementation = false;
			_aspxHelpPage = false;
		}
		
		#endregion

		#region Property Getters/Setters
		
		/// <summary>
		/// Name of the target file. 
		/// </summary>
		/// <remarks>File extension is not included in the file name.</remarks>
		public string FileName
		{
			get { return _fileName;}
			set	{_fileName = value;}
		}
		
		/// <summary>
		/// Source code resides inside the file.
		/// </summary>
		public string SourceCode
		{
			get {return _sourceCode;}
			set	{_sourceCode = value;}
		}

		/// <summary>
		/// Indicates whether the current SourceFile represents an Asmx Declarative or not.
		/// </summary>
		/// <remarks>Default value for this property is false.</remarks>
		public bool AsmxDeclarative
		{
			get { return _asmxDeclarative;}
			set	{_asmxDeclarative = value;}
		}

		/// <summary>
		/// Indicates whether the current SourceFile represents a Service Implementation code.
		/// </summary>
		/// <remarks>Default value for this property is false.</remarks>
		public bool ServiceImplementation
		{
			get{ return _serviceImplementation;}
			set{ _serviceImplementation = value;}
		}
		
		/// <summary>
		/// Indicates whether the current SourceFile represents a ASMX help file.
		/// </summary>
		/// <remarks>Default value for this propery is false.</remarks>
		public bool AspxHelpPage
		{
			get{ return _aspxHelpPage;}
			set{ _aspxHelpPage = value;}
		}

		/// <summary>
		/// Indicates whether the current SourceFile represents the web service proxy implementation.
		/// </summary>
		/// <remarks>Default value for this propery is false.</remarks>
		public bool ProxyImplementation
		{
			get{ return _isProxy;}
			set{ _isProxy = value;}
		}

		/// <summary>
		/// Indicates whether the current SourceFile represents the Asmx help module implementation.
		/// </summary>
		/// <remarks>Default value for this propery is false.</remarks>
		public bool AsmxHelpModule
		{
			get{ return _isAsmxHelpModule;}
			set{ _isAsmxHelpModule = value;}
		}

		#endregion

	}
}
